import request from '@/utils/request'

export function getList() {
  return request({
    url: '/api/express_split_rules/index',
    method: 'get'
  })
}
export function add(data) {
  return request({
    url: '/api/express_split_rules/add',
    method: 'post',
    data: {
      type: data.type,
      description: data.description,
      material_code: data.material_code,
      split_weight: data.split_weight,
      express_company_id: data.express_company_id
    }
  })
}
export function edit(data) {
  return request({
    url: '/api/express_split_rules/edit',
    method: 'post',
    data: {
      id: data.id,
      type: data.type,
      description: data.description,
      material_code: data.material_code,
      split_weight: data.split_weight,
      express_company_id: data.express_company_id
    }
  })
}
export function del(id) {
  return request({
    url: '/api/express_split_rules/del',
    method: 'post',
    data: {
      id
    }
  })
}
export function getCompanyList() {
  return request({
    url: '/api/express_company/company',
    method: 'get'
  })
}
